package com.kede.api.level.controller;

import com.kede.api.groups.CreatedGroups;
import com.kede.api.level.dto.UserIdDto;
import com.kede.api.level.service.ISyUserLevelService;
import com.kede.pojo.ResHttp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author 乔包包
 * @PackageName server-parent-master
 * @Package com.kede.api.level.controller
 * @Date 2024/2/3 15:19
 * @Version 1.0
 */
@RestController
@RequestMapping("level")
public class LevelController extends LevelBaseController{
    @Autowired
    private ISyUserLevelService iSyUserLevelService;

    /**
     * 获取用户等级接口
     * @param userIdDto 用户id请求体
     * @return ResHttp
     */
    @PostMapping("/getUserLevel")
    public ResHttp getUserLevel(@RequestBody @Validated(CreatedGroups.class) UserIdDto userIdDto){
        return iSyUserLevelService.getUserLevel(userIdDto);
    }

    @PostMapping("/getMission")
    public ResHttp getMission(@RequestBody @Validated(CreatedGroups.class) UserIdDto userIdDto){

    }


}
